package ru.passivemoney.root;

import com.dukascopy.api.IContext;

public class ContextHolder {

	private static volatile IContext context = null;
	private static Object lock = new Object();

	public static IContext getContext() {
		return context;
	}

	public static void setContext(IContext context) {
		if(getContext() == null){
			synchronized(lock){
				if(getContext() == null){
					ContextHolder.context = context;
				}
			}
		}
	}
	
}
